<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
$isEmergency = trim($_data["intEmergency"]);
$_isStopAllBet = ($isEmergency == "1")?1:0;

if(empty($_isStopAllBet))$_isStopAllBet = 0;
$String = "<"."?"."php\n";
$String .= "\$_isStopAllBet = ".$_isStopAllBet.";\n";
$String .= "?".">";

$strFile = __Common_Path."/Emergency.inc.php";
if(!writeFile($strFile, $String, "w"))ErrMsgOutputHTML("Error", "", 1);

include(__DBConnect_File);
$String = "";
AddData_Log($_SESSION["Admin_Info"] -> ID, "是否鎖住下注", "管理者(".$_SESSION["AdminUser_Account"]."--".$_SESSION["AdminUser_Name"].")已經將『".(($isEmergency == "1")?"鎖住":"開啟")."』會員下注功能");

if($isEmergency == "1"){
	$GLOBALS["errormessage"] = $_strOperate10M["EmergencyLock"];
}else{
	$GLOBALS["errormessage"] = $_strOperate10M["EmergencyUnLock"];
}
ErrMsgOutputHTML("Error", "", 0);
?><script language="JavaScript">
<!--
<?php 
print "parent.isEmergency = ".$isEmergency.";\n";
print "parent.changEmergency();\n";
print "alert('".$GLOBALS["errormessage"]."');\n";
?>
//-->
</script>